javascript test sheet
Datei: bootstrap-transition.js
required by others
Datei: bootstrap-modal.js
.modal .fade
Button: data-toggle="modal"
href="#myModal" | data-target="#myModal"
onclick="$('#myModal').modal({show: true, remote: '/html/bootstrap-static/rsys.html', backdrop: false})"
href="rsys.html" data-toggle="modal" data-target="#myModal"
Methods
$('#myModal').modal({ backdrop: true, keyboard: false, show: true, remote: 'rsys.html' }) $('#myModal').modal('toggle') $('#myModal').modal('show') $('#myModal').modal('hide') $('#myModal').on('hidden', function () { // show, shown, hide, hidden console.log('hidden'); })
Datei: bootstrap-scrollspy.js
Scrollspy
Scrolling Content: data-spy="scroll" data-target="#navbarExample"
Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.
Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.
In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.
Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
Scrollspy for Navigation
<body data-target=".bs-docs-sidebar" data-spy="scroll"> <ul class="nav nav-list bs-docs-sidenav" data-spy="affix" data-offset-top="275">data-offset-top: problem with top menu changing height, cannot refresh
data-offset-top as function
no data-spy="affix" data-offset-top="275"
<body data-target=".bs-docs-sidebar" data-spy="scroll"> <ul class="nav nav-list bs-docs-sidenav"> $(function () { $('.bs-docs-sidenav').addClass("affix").each(function (){ var $self = $(this); var offsetFn = function () { var h_navbar = $('.navbar-fixed-top').outerHeight(); var h_subhead = $('.subhead').outerHeight(); var h = h_navbar + h_subhead; if ($(".btn-navbar").is(":visible") ) { h = h_navbar + h_subhead; } else { h = h_subhead; } return h; } $self.affix({offset: {top: offsetFn}}); }); });
Datei: bootstrap-tabs.js
tabs
Datei: bootstrap-tooltip.js
rel="tooltip"
$("[rel='tooltip']").tooltip();
-- alternativ -- $('.bs-docs-tooltip-examples').tooltip({ selector : "a[data-toggle=tooltip]" })
Datei: bootstrap-popover.js
popovers // popover demo $("a[data-toggle=popover]").popover().click(function(e) { e.preventDefault() })
Datei: bootstrap-alert.js
.alert .fade
Button: data-dismiss="alert"
.alert .fade .alert-block .alert-error
Extra Button: onclick="$(this).parent().alert('close'); return false;"
Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.
// closed, close
$('#my-alert').bind('closed', function () { // do something… })
Datei: bootstrap-collapse.js
data-toggle="collapse"
Group: data-parent="#accordion2"
$('#collapseThree').on('hidden', function () { // do something… })
Datei: bootstrap-carousel.js
.carousel .slide
.carousel-indicators: data-slide-to="1"
.carousel-control: data-slide="prev" data-slide="next"
Datei: bootstrap-typeahead.js
data-source="["a","b","c"]"
data-items="400"
data-provide="typeahead"
data-minLength="2"
Ajax
$("[data-provide='typeahead-ajax']").typeahead({ source: function (query, process) { return $.get('/json.php?typeahead', { query: query }, function (data) { return process(JSON.parse(data).options); }); } }); // php if (isset($_GET['typeahead'])){ die(json_encode(array('options' => array('Rootsystem','ist','so','cool')))); }All options see http://twitter.github.io/bootstrap/javascript.html#typeahead
Datei: bootstrap-affix.js
data-spy="affix" data-offset-top="200"